<?php defined('KX_ROOT') || exit('Permission denied');?><!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
    <title><?php include \Kuxin\View::parseTpl($tkd['title']);?></title>
    <meta name="keywords" content="<?php include \Kuxin\View::parseTpl($tkd['keywords']);?>">
    <meta name="description" content="<?php include \Kuxin\View::parseTpl($tkd['description']);?>">
    <link rel="stylesheet" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/css/global.css"/>
    <script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/flexible.min.js"></script>
    <link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
    <meta name="author" content="www.ptcms.com">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width" />
    <meta name="applicable-device" content="pc">
    <meta http-equiv="mobile-agent" content="format=html5; url=<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "mobileurl");?><?php echo $_SERVER['REQUEST_URI'];?>">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta http-equiv="Cache-Control" content="no-transform" />
    <link rel="canonical" href="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "pcurl");?><?php echo $_SERVER['REQUEST_URI'];?>" />
</head>
<body>
<!-- 头部 -->
<div class="w100  bg-white flex-wrp flex-align-center flex-between lh100 plr15 ptb15">
    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/return.png" class="pt-return">
    <div class="size18 bold color37"><?php echo $novel['name'];?></div>
    <div>
        <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/ellipsis.png" class="mr5 pt-ellipsis">
    </div>
    <div class="pt5 pb5 pt-tip">
        <a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin']],"");?>" class="block color1 text-center pt-tip-item" title="<?php echo $novel['name'];?>">回到书页</a>
        <a href="<?php echo \Kuxin\Helper\Url::build("index.index",[],"");?>" class="block color1 text-center pt-tip-item" title="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "sitename");?>">前往首页</a>
        <a href="<?php echo \Kuxin\Helper\Url::build("novel.search.index",[],"");?>" class="block color1 text-center pt-tip-item">搜索小说</a>
        <a href="<?php echo \Kuxin\Helper\Url::build("user.mark.index",[],"");?>" class="block color1 text-center pt-tip-item" rel="nofollow">我的书架</a>
        <a href="<?php echo \Kuxin\Helper\Url::build("user.index.index",[],"");?>" class="block color1 text-center pt-tip-item" rel="nofollow">个人中心</a>
    </div>
</div>

<!-- 内容 -->
<div class="flex-wrp bg-white pt-bookdetail">
    <img src="<?php echo $novel['cover'];?>" class="mr15" alt="<?php echo $loop['novel']['name'];?>">
    <div class="flex-item flex-wrp flex-cell flex-between pt5">
        <div class="flex-wrp flex-between lh100 w100 size14 color7">
            <h1><?php echo $novel['name'];?></h1>
            <div class="size12 color4">评分 <span class="size14 color2 num-avg-star" data-star-score="<?php echo $data['star_score'];?>" data-star-num="<?php echo $data['star_num'];?>"><?php echo $data['star_score'];?></span></div>
        </div>
        <div class="size12 lh100 ">作者：<a title="<?php echo $author['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("author.space.index",['authorid'=>$author['id'],'pinyin'=>$author['pinyin'],'name'=>$author['name']],"");?>"><?php echo $author['name'];?></a></div>
        <div class="size12 lh100 color4">分类：<a title="<?php echo $category['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.category.list",['categoryid'=>$category['id'],'key'=>$category['key']],"");?>"><?php echo $category['name'];?></a></div>
        <div class="size12 lh100 color4">
            <?php echo $data['words'];?>万字 / <?php echo $data['allvisit'];?>次点击
        </div>
        <div class="flex-wrp">
            <div class="bg-red mr15 pt-btn"><a href="<?php echo \Kuxin\Helper\Url::build("novel.chapter.read",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin'],'chapterid'=>1],"");?>" class="color1">立即阅读</a></div>
            <div class="pt-btn"><a title="<?php echo $novel['name'];?>最新章节目录" href="<?php echo \Kuxin\Helper\Url::build("novel.novel.dir",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin']],"");?>" class="color42">查看目录</a></div>
        </div>
    </div>
</div>
<div class="bg-white relative plr15 pb15 mb10 size12 color4">
    <span class="compulsory-row-three pt-book-intro"><?php echo nl2br($novel['intro']);?></span>
    <span class="size12 color2 bg-white pt-open" style="right: .15rem;">[展开]</span>
</div>

<!-- 本书作者 -->
<div class="w100 mb10 bg-white lh100 pt-new">
    <div class="flex-wrp flex-between border-b">
        <div class="size14 color7 bold pt-new-title">下载地址</div>
    </div>
    <?php $list=\Kuxin\Block::show('novel.down', ['novelid'=>$novel['id']]);?>
    <?php if($list):?>
    <?php if(is_array($list)): foreach($list as $key =>$loop):?>
    <div class="downtitle flex-wrp flex-between clearfix"> <?php echo strtoupper($key);?> 格式下载 </div>
    <div class="flex-wrp flex-between">
        <?php if(is_array($loop) && (array()!=$loop)): $i=array(); $i['loop']=array_slice($loop,0,null,true); $i['total']=count($loop); $i['count']=count($i['loop']); $i['cols']=1; $i['add']=$i['count']%1?1-$i['count']%1:0; $i['order']=0; $i['row']=1;$i['col']=0;foreach(array_pad($i['loop'],$i['add'],array()) as $i['index']=>$i['list']): $item=$i['list']; $i['order']++; $i['col']++; if($i['col']==1): $i['col']=0; $i['row']++; endif; $i['first']=$i['order']==1; $i['last']=$i['order']==$i['count']; $i['extra']=$i['order']>$i['count'];?>
        <ul class="downitem">
            <li class="site"><?php echo $item['site'];?></li>
            <li class="size"><?php echo file_size_format($item['size']);?></li>
            <li class="date"><?php echo \Kuxin\View::date($item['date'],"Y-m-d");?></li>
            <li class="num"><?php echo $item['num'];?>次</li>
            <li class="link"><a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.downlink",['id'=>$item['id']],"");?>" class="color10">打包下载</a></li>
        </ul>
        <?php endforeach; endif;?>
    </div>
    <?php endforeach; endif;?>
    <?php else:?>
    <div class="downtitle flex-wrp flex-between clearfix"> 本书暂无下载资源，站长正在寻找资源添加中...... </div>
    <?php endif;?>
</div>

<!-- 我要推荐 -->
<div class="w100 mt10 mb10 ptb25 bg-white flex-wrp">
    <div class="w33 flex-wrp flex-cell flex-center pt-tj-btn">
        <div class="pt-tj-icon"></div>
        <div class="size14 mt10 mb5">我要推荐</div>
        <div class="size12 color92"><span class="num-vote"><?php echo $data['vote'];?></span>人推荐</div>
    </div>
    <div class="w33 flex-wrp flex-cell flex-center pt-star-btn">
        <div class="pt-star-icon"></div>
        <div class="size14 mt10 mb5">我来评分</div>
        <div class="size12 color92"><span class="num-star-people"><?php echo $data['star_num'];?></span>人评分</div>
    </div>
    <div class="w33 flex-wrp flex-cell flex-center btn-mark">
        <div class="pt-mark-icon"></div>
        <div class="size14 mt10 mb5 mark-title"><?php echo \Kuxin\View::default($ismark,'加入收藏','取消收藏');?></div>
        <div class="size12 color92"><span class="num-mark"><?php echo $data['mark'];?></span>人收藏</div>
    </div>
</div>


<!-- 热门评论 -->
<div class="w100 mb10 bg-white lh100 pt-comment">
    <div class="flex-wrp flex-between ">
        <div class="size14 color7 bold pt-comment-title">热门评论</div>
        <a title="查看全部" href="<?php echo \Kuxin\Helper\Url::build("novel.comment.list",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin']],"");?>" class="size12 color4 mr15">查看全部 ></a>
    </div>
    <?php $commentlist=\Kuxin\Block::show('comment.list', ['type'=>'novel','userid'=>$userinfo['id'],'typeid'=>$novel['id']]);?>
    <?php if(empty($commentlist)):?>
    <div style="text-align: center;padding-bottom: .1rem;">暂无评论</div>
    <?php else:?>
    <?php if(is_array($commentlist)): foreach($commentlist as $key =>$loop):?>
    <div class="flex-wrp plr15 pt-comment-cont" data-comment-id="<?php echo $loop['id'];?>">
        <img src="<?php echo $loop['user']['avatar'];?>" class="mr20 pt-comment-icon" alt="<?php echo $loop['user']['name'];?>">
        <div class="flex-item flex-wrp flex-cell flex-around">
            <div class="flex-wrp lh100 flex-between">
                <div class="size14 color4"><?php echo $loop['user']['name'];?></div>
                <div class="size12 color4"><?php echo \Kuxin\View::date($loop['datetime'],"Y-m-d H:i:s");?></div>
            </div>
            <a href="<?php echo \Kuxin\Helper\Url::build("novel.comment.post",['novelid'=>$novel['id'],'pinyin'=>$novel['pinyin'],'commentid'=>$loop['id']],"");?>">
                <div class="compulsory-row lh150 ptb10 size14 color32"><?php echo $loop['content'];?></div>
            </a>
            <div class="text-right lh100 comment-btn <?php echo \Kuxin\View::default(boolval($loop['rating']),'','disable');?>">
                <div class="inline-block comment-btn-up <?php echo $loop['rating']=='good'?'active':'';?>">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/praise<?php echo $loop['rating']=='good'?'_hover':'';?>.png" alt="">
                    <span class="size12 color4 number"><?php echo $loop['good_num'];?></span>
                </div>
                <div class="inline-block comment-btn-down <?php echo $loop['rating']=='bad'?'active':'';?>">
                    <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/tread<?php echo $loop['rating']=='bad'?'_hover':'';?>.png" alt="">
                    <span class="size12 color4 number"><?php echo $loop['bad_num'];?></span>
                </div>
            </div>
        </div>
    </div>
    <?php endforeach; endif;?>
    <?php endif;?>
</div>

<!-- 猜你喜欢 -->
<div class="w100 bg-white lh100 pt-recomment">
    <div class="size14 color7 bold pt-recomment-title">猜你喜欢</div>
    <div class="pt-recomment-cont">
        <?php $list=\Kuxin\Block::show('novel.list', ['order'=>'postdate','sort'=>'desc','num'=>3]);?>
        <?php if(is_array($list) && (array()!=$list)): $i=array(); $i['loop']=array_slice($list,0,null,true); $i['total']=count($list); $i['count']=count($i['loop']); $i['cols']=1; $i['add']=$i['count']%1?1-$i['count']%1:0; $i['order']=0; $i['row']=1;$i['col']=0;foreach(array_pad($i['loop'],$i['add'],array()) as $i['index']=>$i['list']): $loop=$i['list']; $i['order']++; $i['col']++; if($i['col']==1): $i['col']=0; $i['row']++; endif; $i['first']=$i['order']==1; $i['last']=$i['order']==$i['count']; $i['extra']=$i['order']>$i['count'];?>
        <div class="flex-wrp pt-recomment-item">
            <a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['novel']['id'],'pinyin'=>$loop['novel']['pinyin']],"");?>">
                <img src="<?php echo $loop['novel']['cover'];?>" class="mr15" alt="<?php echo $loop['novel']['name'];?>">
            </a>
            <div class="flex-item pt5">
                <div class="flex-wrp flex-between">
                    <div class="size14 color7">
                        <a href="<?php echo \Kuxin\Helper\Url::build("novel.novel.index",['novelid'=>$loop['novel']['id'],'pinyin'=>$loop['novel']['pinyin']],"");?>" title="<?php echo $loop['novel']['name'];?>"><?php echo $loop['novel']['name'];?></a>
                    </div>
                    <div class="color2 size14"><?php echo $loop['data']['mark'];?> <span class="size12">人在追</span></div>
                </div>
                <div class="size12 compulsory-row mb10 mt10 lh130 color4">
                    <?php echo $loop['novel']['intro'];?>
                </div>
                <div class="flex-wrp flex-between">
                    <div class="color5 size12"><a href=""><?php echo $loop['author']['name'];?></a></div>
                    <div class="pt-recomment-label"><a title="<?php echo $loop['category']['name'];?>" href="<?php echo \Kuxin\Helper\Url::build("novel.category.list",['categoryid'=>$loop['category']['id'],'key'=>$loop['category']['key']],"");?>"><?php echo $loop['category']['name'];?></a></div>
                </div>
            </div>
        </div>
        <?php endforeach; endif;?>
    </div>
</div>

<!-- 我要评分 -->
<div class="pt-pop-grade pt-star-box" data-type="star">
    <div class="pt-cont">
        <div class="flex-wrp flex-between flex-align-center plr25">
            <div class="pt-close"></div>
            <div class="flex-wrp flex-center">
                <div class="size18 bold colord5">—</div>
                <div class="bold size18 color2 plr15">我要评分</div>
                <div class="size18 bold colord5">—</div>
            </div>
            <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/read_pop_catalogue_close.png" class="pt-close">
        </div>
        <div class="flex-wrp flex-flow-row flex-around plr10 mt30">
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="1"><span class="size14">1</span>分</div>
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="2"><span class="size14">2</span>分</div>
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="3"><span class="size14">3</span>分</div>
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="4"><span class="size14">4</span>分</div>
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="5"><span class="size14">5</span>分</div>
        </div>
        <div class="flex-wrp flex-center size14 color1 pt-submit">确认提交</div>
    </div>
</div>
<!-- 成功评分、已添加到书架、已推荐 -->

<div class="pt-pop-grade pt-tj-box" data-type="vote">
    <div class="pt-cont">
        <div class="flex-wrp flex-between flex-align-center plr25">
            <div class="pt-close"></div>
            <div class="flex-wrp flex-center">
                <div class="size18 bold colord5">—</div>
                <div class="bold size18 color2 plr15">我要推荐</div>
                <div class="size18 bold colord5">—</div>
            </div>
            <img src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/images/read_pop_catalogue_close.png" class="pt-close" alt="关闭按钮">
        </div>
        <div class="flex-wrp flex-flow-row flex-around plr10 mt30">
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="1"><span class="size14">1</span>票</div>
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="2"><span class="size14">2</span>票</div>
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="3"><span class="size14">3</span>票</div>
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="4"><span class="size14">4</span>票</div>
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="5"><span class="size14">5</span>票</div>
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="6"><span class="size14">6</span>票</div>
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="7"><span class="size14">7</span>票</div>
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="8"><span class="size14">8</span>票</div>
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="9"><span class="size14">9</span>票</div>
            <div class="flex-wrp flex-center color62 size12 mb15 pt-square" data-value="all">所有</div>
        </div>
        <div class="flex-wrp flex-center size14 color1 pt-submit">确认提交</div>
    </div>
</div>

<!-- 底部版权 -->
<div class="pt-copyright">
    <div class="size12  w100 text-center mt15 mb10"><a title="隐私声明" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'privacy'],"");?>" class="color4">隐私声明</a> | <a title="免责声明" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'disdaimer'],"");?>" class="color4">免责声明</a> | <a title="关于我们" href="<?php echo \Kuxin\Helper\Url::build("page.detail",['key'=>'about'],"");?>" class="color4">关于我们</a></div>
    <div class="size12 color4 w100 text-center mb10">Copyright © 2009-<?php echo date(Y);?> <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "beian");?></div>
    <div class="size12  w100 text-center"><?php echo \Kuxin\Response::runinfo();?></div>
</div>
<!-- js -->
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/jquery-3.3.1.js"></script>
<script>
    $('.pt-return,.pt-recall').click(function(){
        window.history.back();
    });
    $('.pt-ellipsis').click(function(){
        $('.pt-tip').toggle()
    });
    $('.pt-tip .pt-tip-item').click(function(){
        $('.pt-tip').toggle()
    });
</script>
<div class="none">
    <?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "tongji.mobile");?>
    <?php if(\Kuxin\Helper\Arr::getValue($_kxcms_config, "app.use_cdn")):?>
    <script src="/api/stat/novel/info.js"></script>
    <script src="/api/stat/novel/read.js"></script>
    <?php endif;?>
</div>
<script>var __ADD_STAR='<?php echo \Kuxin\Helper\Url::build("user.star.add",[],"");?>',__NOVEL_ID='<?php echo $novel['id'];?>',__NOVEL_NAME='<?php echo $novel['name'];?>',__ADD_MARK='<?php echo \Kuxin\Helper\Url::build("user.mark.add",[],"");?>',__DEL_MARK='<?php echo \Kuxin\Helper\Url::build("user.mark.del",[],"");?>',__ADD_VOTE='<?php echo \Kuxin\Helper\Url::build("user.vote.add",[],"");?>',__RATING_COMMENT='<?php echo \Kuxin\Helper\Url::build("novel.comment.rating",[],"");?>',__ADD_COMMENT='<?php echo \Kuxin\Helper\Url::build("novel.comment.add",[],"");?>';</script>
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/layer/mobile/layer.js"></script>
<script src="<?php echo \Kuxin\Helper\Arr::getValue($_kxcms_config, "resurl");?>/template/kxmobileno1/js/novel.js"></script>
</body>
</html>